This completes the rename from the previous commit.
}
gboolean
-ostree_pack_file_for_input (GOutputStream *output,
- GFileInfo *finfo,
- GInputStream *instream,
- GVariant *xattrs,
- GChecksum **out_checksum,
- GCancellable *cancellable,
- GError **error)
+ostree_archive_file_for_input (GOutputStream *output,
+ GFileInfo *finfo,
+ GInputStream *instream,
+ GVariant *xattrs,
+ GChecksum **out_checksum,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean ret = FALSE;
guint32 uid, gid, mode;
gid = g_file_info_get_attribute_uint32 (finfo, G_FILE_ATTRIBUTE_UNIX_GID);
mode = g_file_info_get_attribute_uint32 (finfo, G_FILE_ATTRIBUTE_UNIX_MODE);
- g_variant_builder_init (&pack_builder, G_VARIANT_TYPE (OSTREE_PACK_FILE_VARIANT_FORMAT));
+ g_variant_builder_init (&pack_builder, G_VARIANT_TYPE (OSTREE_ARCHIVED_FILE_VARIANT_FORMAT));
pack_builder_initialized = TRUE;
g_variant_builder_add (&pack_builder, "u", GUINT32_TO_BE (0));
g_variant_builder_add (&pack_builder, "u", GUINT32_TO_BE (uid));
}
gboolean
-ostree_parse_packed_file (GFile *file,
- GFileInfo **out_file_info,
- GVariant **out_xattrs,
- GInputStream **out_content,
- GCancellable *cancellable,
- GError **error)
+ostree_parse_archived_file (GFile *file,
+ GFileInfo **out_file_info,
+ GVariant **out_xattrs,
+ GInputStream **out_content,
+ GCancellable *cancellable,
+ GError **error)
{
gboolean ret = FALSE;
char *metadata_buf = NULL;
goto out;
}
- metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_PACK_FILE_VARIANT_FORMAT),
+ metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_ARCHIVED_FILE_VARIANT_FORMAT),
metadata_buf, metadata_len, FALSE,
(GDestroyNotify)g_free,
metadata_buf);
GVariant *ostree_create_directory_metadata (GFileInfo *dir_info,
GVariant *xattrs);
-/* Packed files:
+/* Archived files:
*
* guint32 metadata_length [metadata gvariant] [content]
*
* symlink, then this is the target; if device, then device ID as
* network byte order uint32.
*/
-#define OSTREE_PACK_FILE_VARIANT_FORMAT "(uuuua(ayay)t)"
+#define OSTREE_ARCHIVED_FILE_VARIANT_FORMAT "(uuuua(ayay)t)"
-gboolean ostree_pack_file (GOutputStream *output,
- GFile *file,
- GCancellable *cancellable,
- GError **error);
-
-gboolean ostree_pack_file_for_input (GOutputStream *output,
- GFileInfo *finfo,
- GInputStream *input,
- GVariant *xattrs,
- GChecksum **out_checksum,
- GCancellable *cancellable,
- GError **error);
+gboolean ostree_archive_file_for_input (GOutputStream *output,
+ GFileInfo *finfo,
+ GInputStream *input,
+ GVariant *xattrs,
+ GChecksum **out_checksum,
+ GCancellable *cancellable,
+ GError **error);
gboolean ostree_create_file_from_input (GFile *file,
GFileInfo *finfo,
GCancellable *cancellable,
GError **error);
-gboolean ostree_parse_packed_file (GFile *file,
- GFileInfo **out_file_info,
- GVariant **out_xattrs,
- GInputStream **out_content,
- GCancellable *cancellable,
- GError **error);
+gboolean ostree_parse_archived_file (GFile *file,
+ GFileInfo **out_file_info,
+ GVariant **out_xattrs,
+ GInputStream **out_content,
+ GCancellable *cancellable,
+ GError **error);
gboolean ostree_unpack_object (GFile *file,
OstreeObjectType objtype,
else if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
{
local_file = _ostree_repo_file_nontree_get_local (self);
- if (!ostree_parse_packed_file (local_file, NULL, &ret_xattrs, NULL, cancellable, error))
+ if (!ostree_parse_archived_file (local_file, NULL, &ret_xattrs, NULL, cancellable, error))
goto out;
}
else
if (ostree_repo_get_mode (self->repo) == OSTREE_REPO_MODE_ARCHIVE)
{
- if (!ostree_parse_packed_file (local_child, &ret_info, NULL, NULL, cancellable, error))
+ if (!ostree_parse_archived_file (local_child, &ret_info, NULL, NULL, cancellable, error))
goto out;
}
else
cancellable, error))
goto out;
- if (!ostree_pack_file_for_input (temp_out, file_info, input, xattrs,
- &ret_checksum, cancellable, error))
+ if (!ostree_archive_file_for_input (temp_out, file_info, input, xattrs,
+ &ret_checksum, cancellable, error))
goto out;
if (!g_output_stream_close (temp_out, cancellable, error))
}
gboolean
-ostree_repo_store_packfile (OstreeRepo *self,
- const char *expected_checksum,
- const char *path,
- OstreeObjectType objtype,
- gboolean *did_exist,
- GError **error)
+ostree_repo_store_archived_file (OstreeRepo *self,
+ const char *expected_checksum,
+ const char *path,
+ OstreeObjectType objtype,
+ gboolean *did_exist,
+ GError **error)
{
gboolean ret = FALSE;
GChecksum *checksum = NULL;
}
else
{
- if (!ostree_parse_packed_file (src, &file_info, &xattrs, &input, NULL, error))
+ if (!ostree_parse_archived_file (src, &file_info, &xattrs, &input, NULL, error))
goto out;
}
if (priv->mode == OSTREE_REPO_MODE_ARCHIVE)
{
- if (!ostree_parse_packed_file (object_path, NULL, &xattrs, &packed_input,
- cancellable, error))
+ if (!ostree_parse_archived_file (object_path, NULL, &xattrs, &packed_input,
+ cancellable, error))
goto out;
if (!checkout_file_from_input (dest_path, mode, file_info, xattrs,
const char *object,
OstreeObjectType type);
-gboolean ostree_repo_store_packfile (OstreeRepo *self,
- const char *expected_checksum,
- const char *path,
- OstreeObjectType objtype,
- gboolean *did_exist,
- GError **error);
+gboolean ostree_repo_store_archived_file (OstreeRepo *self,
+ const char *expected_checksum,
+ const char *path,
+ OstreeObjectType objtype,
+ gboolean *did_exist,
+ GError **error);
gboolean ostree_repo_store_object_trusted (OstreeRepo *self,
GFile *file,
if (!fetch_uri (repo, soup, obj_uri, &filename, error))
goto out;
- if (!ostree_repo_store_packfile (repo, object, filename, objtype, did_exist, error))
+ if (!ostree_repo_store_archived_file (repo, object, filename, objtype, did_exist, error))
goto out;
ret = TRUE;
} OtFsckData;
static gboolean
-checksum_packed_file (OtFsckData *data,
- GFile *file,
- GChecksum **out_checksum,
- GError **error)
+checksum_archived_file (OtFsckData *data,
+ GFile *file,
+ GChecksum **out_checksum,
+ GError **error)
{
gboolean ret = FALSE;
GChecksum *ret_checksum = NULL;
if (!g_input_stream_read_all ((GInputStream*)in, metadata_buf, metadata_len, &bytes_read, NULL, error))
goto out;
- metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_PACK_FILE_VARIANT_FORMAT),
+ metadata = g_variant_new_from_data (G_VARIANT_TYPE (OSTREE_ARCHIVED_FILE_VARIANT_FORMAT),
metadata_buf, metadata_len, FALSE, NULL, NULL);
g_variant_get (metadata, "(uuuu@a(ayay)t)",
path);
goto out;
}
- if (!checksum_packed_file (data, objf, &real_checksum, &error))
+ if (!checksum_archived_file (data, objf, &real_checksum, &error))
goto out;
}
else
if (ostree_repo_get_mode (data->src_repo) == OSTREE_REPO_MODE_ARCHIVE)
{
- if (!ostree_repo_store_packfile (data->dest_repo, checksum,
- ot_gfile_get_path_cached (objfile),
- objtype,
- &did_exist,
- &error))
+ if (!ostree_repo_store_archived_file (data->dest_repo, checksum,
+ ot_gfile_get_path_cached (objfile),
+ objtype,
+ &did_exist,
+ &error))
goto out;
}
else